<?php

namespace App\Admin\Controllers;

use App\Http\Controllers\Controller;
use Encore\Admin\Controllers\Dashboard;
use Encore\Admin\Layout\Column;
use Encore\Admin\Layout\Content;
use Encore\Admin\Layout\Row;
use Encore\Admin\Widgets\InfoBox;

class HomeController extends Controller
{
    public function index(Content $content)
    {

        $content->header('首页');
        $content->description('Description...');

        $content->row(function ($row) {
            $row->column(3, new InfoBox('用户数', 'users', 'aqua', '/admin/users', 50));
            $row->column(3, new InfoBox('商品', 'shopping-cart', 'green', '/admin/products', 55));
            $row->column(3, new InfoBox('积分商品', 'maxcdn', 'yellow', '/admin/score_products', 100));
            $row->column(3, new InfoBox('活动', 'windows', 'red', '/admin/actives', 88));
        });

        return $content;
    }
}
